There are known devices and systems, in which it is possible to execute two different operating systems. In some devices, these operating systems can be executed simultaneously, wherein, for example, the user can select the operating system whose information is to be displayed. U.S. Pat. No. 4,747,040 presents one such computer in which it is possible to run the UNIX® and MS-DOS® operating systems. In these devices, it is important to secure that the operating system cannot interfere with such resources controlled by the other operating system, for which the operating system has no access rights. This can be arranged, for example, in such a way that the second operating system operates under the control of the first operating system, wherein the first operating system allocates resources and control rights to the second operating system. The first operating system can also prevent the access of the second operating system to resources allocated for the use of the first operating system only. An example of such a system is VMware™ developed by WMware Inc.
Also such devices are known, in which two operating systems are set to function in the same processor. In this case, the processing of the first operating system and the processing of the second operating system are alternated in the processor. Resource protection can be implemented, for example, in such a way that the first operating system operates in the protected mode, or the like, of the processor, and the second operating system operates in the normal mode of the processor. An operating system to be executed in the protected mode of the processor will have access to all resources, but in the normal mode, the access rights are limited. Thus, the operating system to be run in the normal mode cannot affect certain resources of the operating system to be used in the protected mode.
Also, portable electronic devices have been developed, in which two different operating systems are implemented. In such electronic devices, one operating system is typically a so-called real time operating system (RTOS), whereas the other operating system is typically a non-real time operating system This non-real time operating system can schedule the processing of different functions for example by means of a scheduler or the like which allocates processing time for processes to be run under the control of the operating system. Different processes can be allocated different priorities which determine how much processing time is to be allocated for each process. Normally, the operating of the real time operating system is largely based on pre-empting, wherein a process which needs processing time sets an interrupt which is detected by the real time operating system and set for running this process. Also in the real time operating system, the processes can typically be arranged in an order of priority according to importance and/or urgency. Thus, a process of less importance or a lower priority can be interrupted by a process of more importance or a higher priority; however, a process of a higher priority cannot be interrupted by a process of a lower priority, but such a process of a lower priority will be continued first after all the processes of a higher priority have been served.
FIG. 1a shows, on a principle level, the implementation of two operating systems in the same device. The first operating system OS_A is a real time operating system, and the second operating system OS_B is a non-real time operating system. The first operating system OS_A operates on the basis of interrupts. In this example, it is assumed that the interrupts are further divided into three different categories, wherein the order of importance between the interrupts is the following: The highest priority belongs to fast interrupt requests (FIQ), the next highest priority belongs to interrupt requests (IRQ), and the lowest priority belongs to software interrupt requests (SWI). For each interrupt request, an interrupt service program is provided, to which the operation of the processor is transferred when an interrupt service request enters the processor. This interrupt service program contains program commands for taking the measures required by the event that caused the interrupt request, or for starting such measures.
Furthermore, it is possible to execute tasks for providing a desired function in the first operating system. These tasks are allocated execution time when there are no tasks with a higher priority to be executed. The tasks can also be set in an order of importance, wherein the execution time allocated for different tasks can be different. In the example of FIG. 1a, the second operating system is implemented as one task of the first operating system, wherein the second operating system is executed when this task is in turn to be executed. Typically, in systems of one processor, this second operating system is allocated the lowest priority, wherein it is executed when there are no other tasks or interrupt service programs to be executed.
In the example of FIG. 1a, the second operating system comprises delayed function calls (DFC) which are preferably allocated the highest priority in this second operating system. In addition to these, threads are processed in the second operating system. The threads can be command sequences to be used in the execution of the same process or different processes. A null thread is executed when there is no other process to be executed. Thus, the null thread has the lowest priority in this example case.
In FIG. 1a, the above-described different units are marked in a priority order from top downwards in such a way that the fast interrupt requests, at the top in the figure, have the highest priority. From the point of view of the first operating system, the second operating system is the execution of an idle task. In a corresponding manner, from the point of view of the second operating system, the first operating system is the execution of an interrupt service.
A problem in prior art devices having more than one operating system is, for example, that the execution of a process of one operating system may stop the operation of the whole device. This may be due, for example, to the fact that the second operating system operating under the control of the first operating system locks such a resource which the first operating system needs for executing a time critical task. Another reason for the stopping of the operation may be that a first call by the second operating system to the first operating system locks a resource which is required by a second call to the first operating system.